package com.android.util;

import android.graphics.Bitmap;

public class Stretch {
    static {
        System.loadLibrary("stretchimage");
    }

    public Stretch() {
    }

    public static final int WARPER_TRANSLATE = 0;
    public static final int WARPER_GROW      = 1;
    public static final int WARPER_SHRINK    = 2;

    public static native void createWarp(Bitmap bitmap, int width, int height);

    public static native void beginWarp(int type, int radius, int x, int y);

    /**
     * 仅用于控制 WARPER_GROW 的强度
     * @param strength
     */
    public static native void setStrength(float strength);

    public static native int[] updateWarp(int x, int y);

    public static native int[] endWarp(int x, int y);

    public static native void releaseWarp();
}
